<?php

/**
 * @Author: Wang chunsheng  email:2192138785@qq.com
 * @Date:   2022-08-09 15:21:42
 * @Last Modified by:   Wang chunsheng  email:2192138785@qq.com
 * @Last Modified time: 2023-04-29 23:38:11
 */

namespace Common;

class BaseService
{
    /**
     * 服务中统一返回状态，便于http直接使用.
     *
     * @param string $message
     * @param array $data
     * @param int $status
     *
     * @return array
     * @date 2023-04-29
     *
     * @example
     *
     * @author wang chunSheng
     *
     * @since
     */
    public static function responseData(int $status = 200, array $data = [], string $message = 'success'): array
    {
        return [
            'code' => $status,
            'message' => $message,
            'data' => $data,
        ];
    }
}
